import {HTTP} from "@/utils/http.ts";
import {useState, useEffect} from "react";

const useAddressData = () => {
    const [addressData, setAddressData] = useState(null);

    useEffect(() => {
        async function fetchData() {
            const res = await HTTP.get('/get_address')
            setAddressData(res.data)
        }

        fetchData();
    }, []);

    return {addressData}
}

export default useAddressData